import React, { Component } from 'react'
import useFn from '../position'
import CatUrl from '../assets/cat.gif'

export default function Cat() {

  // render() {
    // let { x, y } = this.state
    let { x, y } = useFn();
    x += 70
    y -=50
    
    return (
      <div>
        <img
          src={CatUrl}
          alt=''
          style={{ position: 'absolute', left: x, top: y }}
        />
      </div>
    )
  }

